package com.example.mybatisplus.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.util.Date;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: hp
 * Date: 2025-01-22
 * Time: 22:45
 */
@Data
@TableName("user_info")//即使类的名称格式有误也可以通过注释来指定表名
public class UserInfo {
    @TableId(type = IdType.AUTO)//使Id自增并且指定主键
    private Integer id;
    private String username;
    private String password;
    private Integer age;
    private Integer gender;
    private String phone;
    @TableField("delete_flag")//字段名称格式有误，可以通过注释来指定字段名
    private Integer deleteFlag;
    private Date createTime;
    private Date updateTime;
}